package com.kasinf.sample.excel.config;

import com.kasinf.framework.common.pojo.dict.DictDataRespDTO;
import com.kasinf.framework.dict.define.ExcelDictProcessor;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author : Kaiser
 * @Date: 2025/5/14  14:44
 */
@Component
public class MyExcelDictProcessor implements ExcelDictProcessor {
    @Override
    public List<DictDataRespDTO> getDictDataList(String dictType) {
        if (dictType.equalsIgnoreCase("user_type")) {
            DictDataRespDTO dto1 = new DictDataRespDTO();
            dto1.setValue("0");
            dto1.setLabel("管理台用户");

            DictDataRespDTO dto2 = new DictDataRespDTO();
            dto2.setValue("1");
            dto2.setLabel("APP用户");
            return List.of(dto1, dto2);
        }
        return List.of();
    }

    @Override
    public List<DictDataRespDTO> getAllDict() {
        return List.of();
    }
}
